package com.ruoyi.web.mapper;

import com.ruoyi.web.cp.domain.rm.ObGame;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface ObGameMapper {
    // 插入操作
    int insert(ObGame obGame);

    int insertSelective(ObGame obGame);

    // 删除操作
    int deleteById(Integer id);

    int deleteByGameId(Integer gameId);

    // 更新操作
    int updateById(ObGame obGame);

    int updateByPrimaryKeySelective(ObGame obGame);

    int updateDetailsByGameId(@Param("details") String details,
                              @Param("gameId") String gameId);

    // 查询操作
    ObGame selectById(Integer id);

    List<ObGame> selectAll();

    List<ObGame> selectByTeam(String teamName);

    ObGame selectByGameId(String gameId);

    List<ObGame> selectByDateRange(@Param("startDate") Date startDate,
                                   @Param("endDate") Date endDate);

    List<String> selectByDateRange2(@Param("startDate") Date startDate,
                                    @Param("endDate") Date endDate);

    List<ObGame> selectByDateRange3(@Param("startDate") Date startDate);

    List<String> selectEmptyScoresGameIds();

}